<template>
	<view class="cell">
		<slot name="left"></slot>
		<view class="title" name="title">{{title}}</view>
		<view class="right">
			<slot name="right"></slot>
			<image v-if="!right" class="icon" src="../static/images/right-1.png"></image>
		</view>
	</view>
</template>

<script>
	export default {
		name:"cell",
		props: {
			title: {
				type: String,
				default: '标题'
			},
			right: {
				type: Boolean,
				default: false
			},
		},
	}
</script>

<style>
	.cell{
		padding: 10px 20px;
		background-color: #fff;
		margin-bottom: 10px;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.title{
		flex: 1;
		margin-left: 20px;
	}
	.icon {
		width: 20px;
		height: 20px;
	}
	.right{
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	
</style>
